/** 设计、属性、动画设置 样式 */
.konva-root-shape-settings {
    animation: dialog-enter-animation 0.3s ease-in-out;
    position: absolute;
    right: 0;
    top: @TopHeight;
    height: calc(100% - @TopHeight);
    width: 260px;
    background-color: #fff;
    border: solid 1px var(--konva-border-color, @konva-border-color);
    box-shadow: 0 0 10px var(--konva-box-shadow-color, @konva-box-shadow-color);
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding: 10px;

    .drag-box {
        height: 20px;
        user-select: none;
        display: flex;
        align-items: center;
        padding-bottom: 10px;
        border-bottom: solid var(--konva-border-color, @konva-border-color) 1px;
        cursor: move;

        span {
            margin-left: 10px;
            font-size: 12px;
        }
    }

    &-menu {
        height: calc(100% - 20px);
        // overflow: hidden;

        &-tabs {
            user-select: none;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: solid var(--konva-border-color, @konva-border-color) 1px;

            .active {
                border-bottom: solid var(--konva-main-color, @konva-main-color) 2px;
            }

            span {
                font-size: 14px;
                transition: all 0.3s;
                color: #41464b;
                padding: 10px 16px;
                cursor: pointer;
                border-bottom: solid transparent 2px;

                &:hover {
                    border-bottom: solid var(--konva-main-color, @konva-main-color) 2px;
                }
            }
        }

        &-content {
            padding-top: 10px;
            height: calc(100% - 50px);
            overflow: hidden;
            overflow-y: auto;
            user-select: none;

            .line {
                margin: 20px 0;
                width: 100%;
                height: 1px;
                border-top: solid var(--konva-border-color, @konva-border-color) 1px;
            }

            // 设计
            .design {
                .background {
                    height: 32px;
                    display: flex;
                    align-items: center;
                    justify-content: space-between;

                    // 重写相关原生组件样式
                    select {
                        height: 100%;
                        padding: 0 10px;
                        border-color: var(--konva-border-color, @konva-border-color);
                        border-radius: @BorderRadius;
                        outline: none;
                        transition: all 0.3s;

                        &:hover {
                            border: solid var(--konva-main-color, @konva-main-color) 1px;
                        }
                    }

                    input {
                        width: 62px;
                        height: 100%;
                        padding: 2px;
                        border-radius: @BorderRadius;
                        border-color: var(--konva-border-color, @konva-border-color);
                        transition: all 0.3s;

                        &:hover {
                            border: solid var(--konva-main-color, @konva-main-color) 1px;
                        }
                    }
                }

                .file-picker {
                    transition: all 0.3s;
                    margin-top: 10px;
                    border: solid var(--konva-border-color, @konva-border-color) 1px;
                    position: relative;
                    width: 100%;
                    height: 120px;
                    border-radius: @BorderRadius;
                    // display: flex;
                    display: none;
                    align-items: center;
                    justify-content: center;
                    cursor: pointer;

                    &:hover {
                        color: var(--konva-main-color, @konva-main-color);
                        border: solid var(--konva-main-color, @konva-main-color) 1px;
                    }
                }

                .zdycolormatch,
                .apply-all {
                    margin-top: 10px;
                    transition: all 0.3s;
                    cursor: pointer;
                    width: 100%;
                    height: 32px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    border-radius: @BorderRadius;
                    border: solid var(--konva-border-color, @konva-border-color) 1px;

                    &:hover {
                        color: var(--konva-main-color, @konva-main-color);
                        border: solid var(--konva-main-color, @konva-main-color) 1px;
                    }
                }
            }

            // 属性
            .items {
                .title {
                    margin: 10px 0;
                }

                .tips-title {
                    font-size: 12px;
                    margin: 10px 0;
                }

                .zdycolormatch {
                    font-size: 12px;
                }

                .colorMatch {
                    display: flex;
                    flex-wrap: wrap;

                    .colorMatchItem {
                        cursor: pointer;
                        transition: all 0.3s;
                        border: solid var(--konva-border-color, @konva-border-color) 2px;
                        display: flex;
                        align-items: center;
                        width: calc(50% - 8px);
                        padding: 8px 4px;
                        margin: 4px;
                        border-radius: @BorderRadius;

                        &:hover {
                            border: solid var(--konva-main-color, @konva-main-color) 2px;
                        }

                        div {
                            margin-left: 2px;
                            height: 15px;
                            width: 15px;
                        }
                    }

                    // 激活的配色方案
                    .active {
                        border: solid var(--konva-main-color, @konva-main-color) 2px;
                    }
                }

                // 基础信息
                .info {
                    display: flex;
                    flex-wrap: wrap;

                    &>div {
                        border-radius: @BorderRadius;
                        transition: all 0.3s;
                        padding: 0 4px;
                        width: calc(50% - 8px);
                        height: 32px;
                        margin: 4px;
                        border: solid var(--konva-border-color, @konva-border-color) 1px;
                        display: flex;
                        align-items: center;
                        justify-content: space-between;

                        &:hover {
                            border: solid var(--konva-main-color, @konva-main-color) 1px;
                        }

                        span {
                            font-size: 12px;
                            height: 30px;
                            line-height: 28px;
                        }

                        input {
                            margin-left: 4px;
                            flex: auto;
                            width: 68px;
                            height: 24px;
                            line-height: 24px;
                            outline: 0;
                            border: 0;
                            display: flex;
                            align-items: center;

                            &:focus-within {
                                outline: none;
                            }
                        }
                    }
                }

                // 边框、文字
                .gridline,
                .stroke,
                .text {
                    &>div {
                        font-size: 14px;
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        margin: 10px 0;
                        height: 32px;

                        span {
                            font-size: 12px;
                        }

                        input,
                        select {
                            transition: all 0.3s;
                            border-radius: @BorderRadius;
                            width: 68px;
                            border: solid var(--konva-border-color, @konva-border-color) 1px;
                            height: 24px;
                            line-height: 32px;

                            &:hover {
                                border: solid var(--konva-main-color, @konva-main-color) 1px;
                            }

                            &:focus-visible {
                                outline: none;
                            }
                        }

                        input[type="checkbox"] {
                            width: 15px;
                        }
                    }
                }

                // 层级
                .level {
                    display: flex;
                    flex-wrap: wrap;

                    span {
                        font-size: 12px;
                        cursor: pointer;
                        margin: 4px 0;
                        border: solid var(--konva-border-color, @konva-border-color) 1px;
                        width: 50%;
                        height: 32px;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        transition: all 0.3s;

                        i {
                            margin-right: 6px;
                        }

                        &:hover {
                            border-color: var(--konva-main-color, @konva-main-color);
                            color: var(--konva-main-color, @konva-main-color);
                        }
                    }
                }

                // 对齐
                .align {
                    display: flex;
                    flex-wrap: wrap;

                    span {
                        cursor: pointer;
                        margin: 4px 0;
                        border: solid var(--konva-border-color, @konva-border-color) 1px;
                        width: calc(100% / 3);
                        height: 32px;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        transition: all 0.3s;

                        i {
                            margin-right: 6px;
                        }

                        &:hover {
                            border-color: var(--konva-main-color, @konva-main-color);
                            color: var(--konva-main-color, @konva-main-color);
                        }
                    }
                }
            }

            // 动画
            .animation {
                height: 100%;
                position: relative;

                .add-animation {
                    font-size: 12px;
                    transition: all 0.3s;
                    position: relative;
                    height: 32px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    border-radius: @BorderRadius;
                    border: solid var(--konva-border-color, @konva-border-color) 1px;
                    cursor: pointer;

                    &:hover {
                        border-color: var(--konva-main-color, @konva-main-color);
                        color: var(--konva-main-color, @konva-main-color);
                    }
                }

                // 动画应用列表
                &-applylist {
                    padding: 10px;
                    margin-top: 10px;
                    min-height: calc(100% - 42px);

                    &-option {
                        div {
                            height: 32px;
                            margin-bottom: 10px;
                            display: flex;
                            align-items: center;
                            justify-content: space-between;

                            span {
                                font-size: 14px;
                            }

                            select,
                            input {
                                border: solid var(--konva-border-color, @konva-border-color) 1px;
                                height: 28px;
                                width: 120px;
                                padding: 4px;
                                outline: none;
                            }
                        }
                    }

                    &-content {
                        margin-top: 10px;
                        border: solid var(--konva-border-color, @konva-border-color) 1px;
                        height: 270px;
                        overflow: hidden;
                        overflow-y: auto;

                        div {
                            font-size: 14px;
                            display: flex;
                            align-items: center;
                            transition: all 0.3s;
                            padding: 8px 4px;
                            cursor: pointer;
                            border-bottom: solid var(--konva-border-color, @konva-border-color) 1px;
                            border-left: solid transparent 2px;

                            &:hover {
                                background-color: var(--konva-background-color,
                                        @konva-background-color );
                                border-left: solid 2px var(--konva-main-color, @konva-main-color);
                            }
                        }
                    }

                    &-btns {
                        position: absolute;
                        bottom: 10px;
                        display: flex;
                        justify-content: space-between;
                        height: 32px;
                        width: calc(100% - 20px);

                        span {
                            font-size: 14px;
                            cursor: pointer;
                            border: solid var(--konva-border-color, @konva-border-color) 1px;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            flex: 1;
                            transition: all 0.3s;

                            &:hover {
                                border-color: var(--konva-main-color, @konva-main-color);
                                color: var(--konva-main-color, @konva-main-color);
                            }
                        }
                    }
                }
            }
        }
    }

    .animation-list {
        user-select: none;
        animation: dialog-enter-animation 0.3s ease-in-out;
        width: 320px;
        padding: 10px;
        position: absolute;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        background-color: #fff;
        border: solid 1px var(--konva-border-color, @konva-border-color);
        box-shadow: 0 0 10px var(--konva-box-shadow-color, @konva-box-shadow-color);

        .close {
            position: absolute;
            right: 10px;
            cursor: pointer;
        }

        .title {
            padding: 0 10px;
            margin: 10px 0;
            border-left: solid var(--konva-main-color, @konva-main-color);
        }

        .items {
            margin: 20px 0;
            display: flex;
            flex-wrap: wrap;
            cursor: pointer;

            span {
                transition: all 0.3s;
                width: calc(100% / 4);
                font-size: 12px;
                display: flex;
                flex-direction: column;
                align-items: center;
                padding: 4px;
                border-radius: @BorderRadius;
                color: #303133;
                border: solid transparent 1px;

                &:hover {
                    border: solid var(--konva-main-color, @konva-main-color) 1px;
                }

                svg,
                i {
                    margin-bottom: 8px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    width: 100%;
                    height: 50px;
                    font-size: 28px;
                    color: var(--konva-main-color-3, @konva-main-color-3);
                }
            }
        }

        // 动画子项
        &-item {
            &:hover {
                span {
                    display: inline-block;
                }
            }

            span {
                display: none;
                margin-left: auto;

                i {
                    margin-left: 10px;

                    &:hover {
                        color: var(--konva-main-color, @konva-main-color);
                    }
                }
            }
        }
    }
}